package com.edu.arrayList;

public class student {
    //定义学生类，实现一个按学号查询的操作，比较简单，对应arrayListDemo02
    private String studentNum;//学号
    private String name;//姓名
    private int age;//年龄
    private String className;//班级

    public student() {
    }

    public student(String studentNum, String name, int age, String className) {
        this.studentNum = studentNum;
        this.name = name;
        this.age = age;
        this.className = className;
    }

    public String getStudentNum() {
        return studentNum;
    }

    public void setStudentNum(String studentNum) {
        this.studentNum = studentNum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Override
    public String toString() {
        return "student{" +
                "studentNum='" + studentNum + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", className='" + className + '\'' +
                '}';
    }
}
